<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0039)http://sns.byr.edu.cn/cp.php?ac=profile -->
<html xmlns="http://www.w3.org/1999/xhtml" ><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="x-ua-compatible" content="ie=7">
<title>完善信息</title>
<script language="javascript" type="text/javascript" src="css/makeup/script_cookie.js"></script>
<script language="javascript" type="text/javascript" src="css/makeup/script_common.js"></script>
<script language="javascript" type="text/javascript" src="css/makeup/script_menu.js"></script>
<script language="javascript" type="text/javascript" src="css/makeup/script_ajax.js"></script>
<script language="javascript" type="text/javascript" src="css/makeup/script_face.js"></script>
<script language="javascript" type="text/javascript" src="css/makeup/script_manage.js"></script>

<link rel="shortcut icon" href="http://sns.byr.edu.cn/image/favicon.ico">
<link rel="edituri" type="application/rsd+xml" title="rsd" href="http://sns.byr.edu.cn/xmlrpc.php?rsd=7679">
<link href="css/bootstrapmin.css" rel="stylesheet" media="screen">
  <link href="css/style.css" rel="stylesheet">
  
<link rel="icon" href="" type="image/x-icon" />
<link rel="shortcut icon" href="" type="image/x-icon" />

  
</head>

<body id="bg-img">
	<!-- header -->
  <!-- <div id ="top_img">
	 <img src="img/top_img.png"></img>
		<ul id = "top_menu">
			<li>&nbsp;&nbsp;&nbsp;<a href="index.php">实验室主页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
			<li><a href="People.php">实验室成员</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
			<li><a href="Achievement.html">学术成果</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
			<li><a href="Conference.html">期刊会议</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
			<li><a href="Weekly/Weekly.php">周报</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
			<li><a href="#?">公共资源</a></li>
		</ul>
	</div>-->
	<?php
		require("header.php");
	?>
<!-- end of header -->

<div id= "achievement">
<?php
	require("DBops.php");
	session_start();
	$con = connect("localhost", "root", "", "lab");
	$result = query($con, "*", "personalinfo", "ID", $_SESSION['user']);
	$row = mysql_fetch_array($result);
	$ID=$_GET['id'];
	$result = query($con, "*", "personalinfo", "ID", $ID);
	$row = mysql_fetch_array($result);
	
	if(isset($_SESSION['user']))
	{
		echo "<div style='height:30px;background:#A4D3EE;'>
		      
              <p  style='margin-right:10px;float:right;'>登录为: <a href = \"infor.php?id=".$_SESSION['user']."\">".$_SESSION['user']."</a></font>&nbsp&nbsp<a  onclick=\"if(confirm('确定要退出系统吗?')){parent.location.href ='login.php'}\" href=\"javascript:void(0)\">退出</a></font></p></div>";
	}
	else
	{
		echo "<div style='height:30px;background:#A4D3EE;'>
				<ul>
              <li  style='margin-right:100px;float:right;'><a href ='login.php'>登录</a></div>";
	}
	
	echo"
	<div id='infor'>
	<p class='title'><img src='css/makeup/profile.gif' style='width:24px;height:24px;' >个人设置</img></p>
	<div class='tabs_header'>
	 <ul class='tabs'>
		<li class='active'><a href='Makeup.php?id=$ID'><span>基本资料</span></a></li>
		<li>&nbsp;&nbsp;<a href='Photo.php?id=$ID'><span>我的头像</span></a></li>

	</ul>
</div>
	<form method='post' action='save.php?id=$ID'>


<table cellspacing='10' cellpadding='10' class='formtable' border='0' style='width:650px;'>
<tbody>
	<tr>
		<th style='100px;'>证件:</th>
		<td>		
			".$row['ID']."		
		</td>
	<tr/>
</tr>
<tr>
<th style='width:10em'>姓名:</th>
<td>
	".$row['name']."	
</td>
<td>&nbsp;</td>
</tr>
<tr>
<th style=\"width:10em;\">手机:</th>
<td>
<textarea  value='' name='phone' id='phone' onBlur='check()' style='width:150px;height:20px;'  >" .$row['phone']." </textarea>
                           <span id='phones'></span>                         * </td>
</td>

</tr>
<tr>
<th style=\"width:10em;\">邮箱:</th>

<td>
		  		          
		  <textarea  id='email' name='email' value='' onBlur='check()' style='width:250px;height:20px;' >" .$row['email']."</textarea>
                          <span id='emails'></span>						 		  		       *</td>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<th style=\"width:10em;\">地址:</th>
<td style=\"height:25px;\">
<textarea  id=\"office\" name=\"office\"  class=\"t_input\" style='width:250px;height:20px;'>  " .$row['office']."</textarea>
</td>
<td>&nbsp;</td>
</tr>
<th style=\"width:10em;\">职称&学位:</th>
<td>
<select id=\"titleOrDegree\" name=\"titleOrDegree\">
<option name ='教授' value=\"教授\">教授</option>
<option name='副教授' value=\"副教授\">副教授</option>
<option name='讲师' value=\"讲师\">讲师</option>
<option name='博士' value=\"博士\">博士</option>
<option name='硕士' value=\"硕士\" >硕士</option>
<option name='已毕业' value=\"已毕业\" >已毕业</option>
</select>
</td>

</tr>
<tr>
<th style=\"width:10em;\">个人简介:</th>
<td style=\"height:25px;colspan:2;\">
<textarea name=\"selfIntro\" cols='90' rows='4' wrap='physical' style='width:500px;' >" .$row['selfIntro']."</textarea>

</td>
<td>&nbsp;</td>
</tr>

<tr><br/>
<th style=\"width:10em;\">研究课题:</th>
<td style=\"height:25px; colspan:2\">
<textarea name=\"researchArea\" cols='90' rows='4' wrap='physical' style='width:500px;' >" .$row['researchArea']."</textarea>

</td>
<td>&nbsp;</td>
</tr><br/>
<tr>
<th style=\"width:10em;\">&nbsp;</th>
<td>

</td>
<td>&nbsp;</td>
</tr>
</tr>

<tr><br/>
<th style=\"width:10em;\">&nbsp;</th>
<td>

<input type=\"submit\" name=\"submit\" value=\"保存\" >
</td>
<td>&nbsp;</td>
</tr>
</tbody></table>

</form>

	";
?>

<script type="text/javascript">
function phone()
				{
		     	   var phone = document.getElementById("phone").value;  //联系电话
		     	   
		     	   //正则表达式使用方法
		     	   var reg= /^\d{11}$/;   //
				   if(phone==""){
				    document.getElementById("phones").innerHTML = "<font color='red'>联系电话格不能为空</font>";
								   return false;
				   }
				   if(phone !="")
				   {
						   if(!(reg.test(phone))){
		     	   				  document.getElementById("phones").innerHTML = "<font color='red'>联系电话格式不正确</font>";
								   return false;
		     					  }
							 else {
									 document.getElementById("phones").innerHTML = "<font color='green'>联系电话输入正确</font>";
									  return true;
									  }
				   }
		     	  }
		     	   
		     	   
		     	  function email()
				  {
		     	   var email = document.getElementById("email").value;  //email邮箱
		     	    //alert(email);
					//邮箱验证
                        var e=/^\w+([-+.]\w+)*@\w+([-.]\\w+)*\.\w+([-.]\w+)*$/;
						if(email=="")
						{
						 document.getElementById("emails").innerHTML = "<font color='red'>邮箱不能为空</font>";		
								    return false;
						}
						if(email !="")
						{
							if(!(e.test(email)))
							{
								   document.getElementById("emails").innerHTML = "<font color='red'>邮箱格式不正确</font>";		
								    return false;
							}
							else{
									document.getElementById("emails").innerHTML = "<font color='green'>邮箱正确</font>";		
									 return true;
								}
						}
						}
						
		     	   function check(){
                if (phone()&&email()) {
                    return true;
                }
                else {
                    return false;
                }
            }
		     	     	   




</script>

</div>

<!--/mainarea-->

<!--/wrap-->








</body></html>
